<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: ailayer_leaky_relu.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('ailayer__leaky__relu_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ailayer_leaky_relu.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ailayer__leaky__relu_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#ifndef LEAKY_RELU_LAYER</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#define LEAKY_RELU_LAYER</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aifes__core_8h.html">core/aifes_core.h</a>&quot;</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structailayer__leaky__relu.html">ailayer_leaky_relu</a>   <a class="code" href="structailayer__leaky__relu.html">ailayer_leaky_relu_t</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structailayer__leaky__relu.html">   50</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structailayer__leaky__relu.html">ailayer_leaky_relu</a> {</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structailayer__leaky__relu.html#ab13782a46e3804246bf82a92955096b3">   51</a></span>&#160;    <a class="code" href="structailayer.html">ailayer_t</a> <a class="code" href="structailayer__leaky__relu.html#ab13782a46e3804246bf82a92955096b3">base</a>; </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structailayer__leaky__relu.html#a6f10973551c9c29b8702e1d337ef9482">   59</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structailayer__leaky__relu.html#a6f10973551c9c29b8702e1d337ef9482">alpha</a>; </div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structailayer__leaky__relu.html#a613b3803623022d2b05a4d0cf1c8db24">   60</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="structaimath__dtype.html">aimath_dtype_t</a> *<a class="code" href="structailayer__leaky__relu.html#a613b3803623022d2b05a4d0cf1c8db24">alpha_dtype</a>; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; </div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="structailayer__leaky__relu.html#adfec7e88122c57b43b8b572338e0fc08">   81</a></span>&#160;    void (*<a class="code" href="structailayer__leaky__relu.html#adfec7e88122c57b43b8b572338e0fc08">leaky_relu</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <span class="keyword">const</span> <span class="keywordtype">void</span> *<a class="code" href="structailayer__leaky__relu.html#a6f10973551c9c29b8702e1d337ef9482">alpha</a>, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="structailayer__leaky__relu.html#aec0246cd034131a14c8f77d21dd65dda">   96</a></span>&#160;    void (*<a class="code" href="structailayer__leaky__relu.html#aec0246cd034131a14c8f77d21dd65dda">d_leaky_relu</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *x, <span class="keyword">const</span> <span class="keywordtype">void</span> *<a class="code" href="structailayer__leaky__relu.html#a6f10973551c9c29b8702e1d337ef9482">alpha</a>, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="structailayer__leaky__relu.html#a50f5e44b0fca9c1e79a5287adb4a59eb">  105</a></span>&#160;    void (*<a class="code" href="structailayer__leaky__relu.html#a50f5e44b0fca9c1e79a5287adb4a59eb">multiply</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;};</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structaicore__layertype.html">aicore_layertype_t</a> *<a class="code" href="ailayer__leaky__relu_8h.html#ad29ac6fffebe8dec5bcc97ac82f849b4">ailayer_leaky_relu_type</a>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="ailayer__leaky__relu_8h.html#a7b5ad1280acb0a01c6c1eff7b8c54859">  128</a></span>&#160;<a class="code" href="structailayer.html">ailayer_t</a> *<a class="code" href="ailayer__leaky__relu_8h.html#a7b5ad1280acb0a01c6c1eff7b8c54859">ailayer_leaky_relu</a>(<a class="code" href="structailayer__leaky__relu.html">ailayer_leaky_relu_t</a> *layer, <a class="code" href="structailayer.html">ailayer_t</a> *input_layer);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160; </div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="ailayer__leaky__relu_8h.html#ac0f59da334c8914d0c904739af1dddad">  150</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="ailayer__leaky__relu_8h.html#ac0f59da334c8914d0c904739af1dddad">ailayer_leaky_relu_forward</a>(<a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160; </div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="ailayer__leaky__relu_8h.html#acabd8cc4484396fbf73b77270f22291f">  175</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="ailayer__leaky__relu_8h.html#acabd8cc4484396fbf73b77270f22291f">ailayer_leaky_relu_backward</a>(<a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160; </div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="ailayer__leaky__relu_8h.html#a299eb7558f2be75b8616798b2f16e46f">  186</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="ailayer__leaky__relu_8h.html#a299eb7558f2be75b8616798b2f16e46f">ailayer_leaky_relu_calc_result_shape</a>(<a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="preprocessor">#ifdef AIDEBUG_PRINT_MODULE_SPECS</span></div>
<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="ailayer__leaky__relu_8h.html#a97b4a98d91a747998251ae714f1a956d">  193</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="ailayer__leaky__relu_8h.html#a97b4a98d91a747998251ae714f1a956d">ailayer_leaky_relu_print_specs</a>(<span class="keyword">const</span> <a class="code" href="structailayer.html">ailayer_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIDEBUG_PRINT_MODULE_SPECS</span></div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160; </div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// LEAKY_RELU_LAYER</span></div>
<div class="ttc" id="aaifes__core_8h_html"><div class="ttname"><a href="aifes__core_8h.html">aifes_core.h</a></div><div class="ttdoc">AIfES 2 core interface.</div></div>
<div class="ttc" id="aailayer__leaky__relu_8h_html_a299eb7558f2be75b8616798b2f16e46f"><div class="ttname"><a href="ailayer__leaky__relu_8h.html#a299eb7558f2be75b8616798b2f16e46f">ailayer_leaky_relu_calc_result_shape</a></div><div class="ttdeci">void ailayer_leaky_relu_calc_result_shape(ailayer_t *self)</div><div class="ttdoc">Calculate the shape of the result tensor.</div></div>
<div class="ttc" id="aailayer__leaky__relu_8h_html_a7b5ad1280acb0a01c6c1eff7b8c54859"><div class="ttname"><a href="ailayer__leaky__relu_8h.html#a7b5ad1280acb0a01c6c1eff7b8c54859">ailayer_leaky_relu</a></div><div class="ttdeci">ailayer_t * ailayer_leaky_relu(ailayer_leaky_relu_t *layer, ailayer_t *input_layer)</div><div class="ttdoc">Initialize and connect the given Leaky ReLU layer.</div></div>
<div class="ttc" id="aailayer__leaky__relu_8h_html_a97b4a98d91a747998251ae714f1a956d"><div class="ttname"><a href="ailayer__leaky__relu_8h.html#a97b4a98d91a747998251ae714f1a956d">ailayer_leaky_relu_print_specs</a></div><div class="ttdeci">void ailayer_leaky_relu_print_specs(const ailayer_t *self)</div><div class="ttdoc">Print the layer specification.</div></div>
<div class="ttc" id="aailayer__leaky__relu_8h_html_ac0f59da334c8914d0c904739af1dddad"><div class="ttname"><a href="ailayer__leaky__relu_8h.html#ac0f59da334c8914d0c904739af1dddad">ailayer_leaky_relu_forward</a></div><div class="ttdeci">void ailayer_leaky_relu_forward(ailayer_t *self)</div><div class="ttdoc">Calculate the forward pass for given Leaky ReLU layer.</div></div>
<div class="ttc" id="aailayer__leaky__relu_8h_html_acabd8cc4484396fbf73b77270f22291f"><div class="ttname"><a href="ailayer__leaky__relu_8h.html#acabd8cc4484396fbf73b77270f22291f">ailayer_leaky_relu_backward</a></div><div class="ttdeci">void ailayer_leaky_relu_backward(ailayer_t *self)</div><div class="ttdoc">Calculate the backward pass for the given Leaky ReLU layer.</div></div>
<div class="ttc" id="aailayer__leaky__relu_8h_html_ad29ac6fffebe8dec5bcc97ac82f849b4"><div class="ttname"><a href="ailayer__leaky__relu_8h.html#ad29ac6fffebe8dec5bcc97ac82f849b4">ailayer_leaky_relu_type</a></div><div class="ttdeci">const aicore_layertype_t * ailayer_leaky_relu_type</div><div class="ttdoc">Leaky ReLU layer type.</div></div>
<div class="ttc" id="astructaicore__layertype_html"><div class="ttname"><a href="structaicore__layertype.html">aicore_layertype</a></div><div class="ttdoc">Type indicator of the layer.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:82</div></div>
<div class="ttc" id="astructailayer__leaky__relu_html"><div class="ttname"><a href="structailayer__leaky__relu.html">ailayer_leaky_relu</a></div><div class="ttdoc">General Leaky ReLU layer  struct.</div><div class="ttdef"><b>Definition:</b> ailayer_leaky_relu.h:50</div></div>
<div class="ttc" id="astructailayer__leaky__relu_html_a50f5e44b0fca9c1e79a5287adb4a59eb"><div class="ttname"><a href="structailayer__leaky__relu.html#a50f5e44b0fca9c1e79a5287adb4a59eb">ailayer_leaky_relu::multiply</a></div><div class="ttdeci">void(* multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)</div><div class="ttdoc">Required math function: Element wise tensor multiplication.</div><div class="ttdef"><b>Definition:</b> ailayer_leaky_relu.h:105</div></div>
<div class="ttc" id="astructailayer__leaky__relu_html_a613b3803623022d2b05a4d0cf1c8db24"><div class="ttname"><a href="structailayer__leaky__relu.html#a613b3803623022d2b05a4d0cf1c8db24">ailayer_leaky_relu::alpha_dtype</a></div><div class="ttdeci">const aimath_dtype_t * alpha_dtype</div><div class="ttdoc">Data type of scalar parameter .</div><div class="ttdef"><b>Definition:</b> ailayer_leaky_relu.h:60</div></div>
<div class="ttc" id="astructailayer__leaky__relu_html_a6f10973551c9c29b8702e1d337ef9482"><div class="ttname"><a href="structailayer__leaky__relu.html#a6f10973551c9c29b8702e1d337ef9482">ailayer_leaky_relu::alpha</a></div><div class="ttdeci">void * alpha</div><div class="ttdoc">Parameter  used to calculate Leaky ReLU function for input values &lt; 0.</div><div class="ttdef"><b>Definition:</b> ailayer_leaky_relu.h:59</div></div>
<div class="ttc" id="astructailayer__leaky__relu_html_ab13782a46e3804246bf82a92955096b3"><div class="ttname"><a href="structailayer__leaky__relu.html#ab13782a46e3804246bf82a92955096b3">ailayer_leaky_relu::base</a></div><div class="ttdeci">ailayer_t base</div><div class="ttdoc">Inherited field members from general ailayer struct.</div><div class="ttdef"><b>Definition:</b> ailayer_leaky_relu.h:51</div></div>
<div class="ttc" id="astructailayer__leaky__relu_html_adfec7e88122c57b43b8b572338e0fc08"><div class="ttname"><a href="structailayer__leaky__relu.html#adfec7e88122c57b43b8b572338e0fc08">ailayer_leaky_relu::leaky_relu</a></div><div class="ttdeci">void(* leaky_relu)(const aitensor_t *x, const void *alpha, aitensor_t *result)</div><div class="ttdoc">Required math function: Leaky ReLU.</div><div class="ttdef"><b>Definition:</b> ailayer_leaky_relu.h:81</div></div>
<div class="ttc" id="astructailayer__leaky__relu_html_aec0246cd034131a14c8f77d21dd65dda"><div class="ttname"><a href="structailayer__leaky__relu.html#aec0246cd034131a14c8f77d21dd65dda">ailayer_leaky_relu::d_leaky_relu</a></div><div class="ttdeci">void(* d_leaky_relu)(const aitensor_t *x, const void *alpha, aitensor_t *result)</div><div class="ttdoc">Required math function: Derivative of Leaky ReLU.</div><div class="ttdef"><b>Definition:</b> ailayer_leaky_relu.h:96</div></div>
<div class="ttc" id="astructailayer_html"><div class="ttname"><a href="structailayer.html">ailayer</a></div><div class="ttdoc">AIfES layer interface.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:252</div></div>
<div class="ttc" id="astructaimath__dtype_html"><div class="ttname"><a href="structaimath__dtype.html">aimath_dtype</a></div><div class="ttdoc">Indicator for the used datatype.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:44</div></div>
<div class="ttc" id="astructaitensor_html"><div class="ttname"><a href="structaitensor.html">aitensor</a></div><div class="ttdoc">A tensor in AIfES.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:89</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1e5d3661ed79af157d57e64a38265d09.html">basic</a></li><li class="navelem"><a class="el" href="dir_90008ee2b0f86999412b56217da88d54.html">base</a></li><li class="navelem"><a class="el" href="dir_ad1f3f314a3dbbd36ea1eb350865d78d.html">ailayer</a></li><li class="navelem"><a class="el" href="ailayer__leaky__relu_8h.html">ailayer_leaky_relu.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
